package HomeWork;

import java.util.Scanner;

/*
2 键盘录入学员张浩的3门课程(Java、SQL、Web)的成绩
编写程序实现：
	(1)Java课程和SQL课程的分数值差
	(2)3门课程的平均分
 */
public class Extra02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        //录入成绩
        System.out.println("请输入Java的成绩");
        int a = sc.nextInt();
        System.out.println("请输入SQL的成绩");
        int b = sc.nextInt();
        System.out.println("请输入Web的成绩");
        int c = sc.nextInt();

        System.out.println("--------------------------------");
        System.out.println("Java" + "     " + "SQL" + "     " + "WEB");
        System.out.println(" " + a + "      " + b + "      " + c);
        System.out.println("--------------------------------");
        System.out.println("Java和SQL成绩差：" + ((a-b)>0?(a-b):-(a-b)));
        System.out.println("三门课的平均分是：" + (a+b+c)/3.0);
    }
}
